<%@ page language="java" import="java.text.*, java.util.*, com.zjut.zs.util.tools.*,com.zjut.zs.userinfo.manager.*, com.zjut.zs.userinfo.dao.*,
com.zjut.zs.user.manager.*, com.zjut.zs.user.dao.*,com.zjut.zs.exvalue.manager.*,com.zjut.zs.exvalue.dao.*,com.zjut.zs.cj.manager.*, com.zjut.zs.cj.dao.*,
com.zjut.an.util.tools.*,com.zjut.an.util.system.*,com.zjut.zs.xy.manager.*, com.zjut.zs.xy.dao.*,com.zjut.zs.zxlb.manager.*, com.zjut.zs.zxlb.dao.*,
com.zjut.zs.exvalue.dao.*,com.zjut.zs.coname.manager.*, com.zjut.zs.school.manager.*, com.zjut.zs.school.dao.*,com.zjut.zs.userstatus.manager.*, com.zjut.zs.userstatus.dao.*,
com.zjut.zs.shhd.manager.*, com.zjut.zs.shhd.dao.*,com.zjut.an.config.manager.*, com.zjut.an.config.dao.*" pageEncoding="utf-8"%>
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">  
<meta name="renderer" content="webkit"> 
<title>无标题文档</title>

<link href="css/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
h1 {
	font-size:32px;
	font-family: "Arial","Microsoft YaHei","����","����",sans-serif;
}
table.gridtable {
	font-family: verdana,arial,sans-serif;
	font-size:11px;
	color:#333333;
	border-width: 1px;
	border-color: #666666;
	border-collapse: collapse;
}
table.gridtable td {
	border: 1px solid #666;
	padding: 6px;
}
table.toptable td {
	border: 1px solid #666;
	border-bottom:none;
	padding: 6px;
}
table.cj {table-layout: fixed;}
table.cj td {
	border: 1px solid #666;
	border-bottom:none;
	padding: 6px;
}
-->
</style>
<script type="text/javascript" src="../plugins/assets/plugins/jquery-3.5.1.min.js"></script>
<script type="text/javascript">
function printHtml(html) {
	var bodyHtml = document.body.innerHTML;
	document.body.innerHTML = html;
	window.print();
	document.body.innerHTML = bodyHtml;
}
function onprint() {
	var html = $("#container").html();
	printHtml(html);
}
</script>

</head>
<%	

AnConfigManager anconfig = (AnConfigManager) SpringContextUtil.getBean("AnConfigManager");
ZsSchoolManager zsManager = (ZsSchoolManager) SpringContextUtil.getBean("ZsSchoolManager");
ZsCoNameManager comanager = (ZsCoNameManager) SpringContextUtil.getBean("ZsCoNameManager");
ZsExValueManager evmanager = (ZsExValueManager) SpringContextUtil.getBean("ZsExValueManager");
ZsUserinfoManager uimanager = (ZsUserinfoManager) SpringContextUtil.getBean("ZsUserinfoManager");
ZsUserStatusManager usmanager = (ZsUserStatusManager) SpringContextUtil.getBean("ZsUserStatusManager");
ZsZxlbManager zmanager = (ZsZxlbManager) SpringContextUtil.getBean("ZsZxlbManager");
ZsShhdManager smanager = (ZsShhdManager) SpringContextUtil.getBean("ZsShhdManager");
ZsCjManager cmanager = (ZsCjManager) SpringContextUtil.getBean("ZsCjManager");
ZsXyManager xmanager = (ZsXyManager) SpringContextUtil.getBean("ZsXyManager");
ZsUserManager umanager = (ZsUserManager) SpringContextUtil.getBean("ZsUserManager");
ZsHTMLCreat html = (ZsHTMLCreat) SpringContextUtil.getBean("ZsHTMLCreat");

ZsSchool school = new ZsSchool();
school = (ZsSchool)zsManager.getDataByInstance(1,1,null,null,school).getObjects().get(0);

ZsUser user = null;
ZsExValue exValue = new ZsExValue();
ZsUserinfo userinfo = new ZsUserinfo();
if(session.getAttribute("admin")!=null && request.getParameter("usId")!=null) {
	int usId = Integer.parseInt(request.getParameter("usId"));
	user = umanager.getData(usId);
} else if (session.getAttribute("zsUser")!=null) {
	user = (ZsUser)session.getAttribute("zsUser");
}
if (user!=null) {	
	exValue.setZsUser(user);	
	userinfo.setZsUser(user);
	List uilist = uimanager.getDataByInstance(1,1,null,null,userinfo).getObjects();
	List evlist = evmanager.getDataByInstance(1,1,null,null,exValue).getObjects();
	
	if (evlist.size()>0) {
		exValue = (ZsExValue)evlist.get(0);
	}
	if (uilist.size()>0) {
		userinfo = (ZsUserinfo)uilist.get(0);
	}
}
ZsUserStatus userstatus = usmanager.getDataByUser(user);
String receiveno = html.getReceiveNo(user.getUsNo());
%>
<body>
<jsp:include page="zs_uservalidate.jsp" flush="true"/>
	<div class="place" style="margin-top:0;">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="index.jsp">首页</a></li>
    <li><a href="#">测试通知单打印</a></li>
    </ul>
    </div>
    <input type="button" onclick="onprint()" value="打印" class="btn btn-primary btn-sm" style="margin:20px;"/>

<div id="container" class="container" style="width:100%;">
    
  		<div style="text-align:center"><h1><%=anconfig.getSingleConfigInfoByName("测试通知单名称") %></h1></div>
  		<table width="1000" class="toptable" style="margin:0 auto;">
    		  <tr>
		        <td>
		        <div style="width:190px;float:left;">网上报名编号：<%=receiveno %></div>
		        <div <%if(!Status.YES.getStatus().equals(comanager.getDataByCoEn("column1").getAddPermit()))out.print("style='display:none'"); %> style="width:190px;float:left;"><%=comanager.getDataByCoEn("column1").getCoCn() %>:
		        <%=exValue.getColumn1() %></div>
		        <div <%if(!Status.YES.getStatus().equals(comanager.getDataByCoEn("column2").getAddPermit()))out.print("style='display:none'"); %> style="width:190px;float:left;"><%=comanager.getDataByCoEn("column2").getCoCn() %>:
		        <%=exValue.getColumn2() %></div>
		        <div <%if(!Status.YES.getStatus().equals(comanager.getDataByCoEn("column3").getAddPermit()))out.print("style='display:none'"); %> style="width:190px;float:left;"><%=comanager.getDataByCoEn("column3").getCoCn() %>:
		        <%=exValue.getColumn3() %></div>
		        <div <%if(!Status.YES.getStatus().equals(comanager.getDataByCoEn("column4").getAddPermit()))out.print("style='display:none'"); %> style="width:190px;float:left;"><%=comanager.getDataByCoEn("column4").getCoCn() %>:
		        <%=exValue.getColumn4() %></div>
		        </td>
		      </tr>
   		</table>
  <table width="1000" class="gridtable" style="margin-bottom:0px;margin:0 auto;">
   		  <tr>
   		    <td>姓　名：</td>
   		    <td><%=user.getUsName() %></td>
   		    <td>性　别：</td>
   		    <td><%=userinfo.getInSex() %></td>
   		    <td>出生日期：</td>
   		    <td><%=userinfo.getInBirthday() %></td>
   		    <td rowspan="10" align="center" valign="top"><img name="" src="../<%=userinfo.getInPhoto()%>" width="180" height="240" alt="" /></td>
          </tr>
   		  <tr>
   		    <td>民　族：</td>
   		    <td><%=userinfo.getInMz() %></td>
   		    <td>政治面貌：</td>
   		    <td><%=userinfo.getInZz() %></td>
   		    <td>考生类别：</td>
   		    <td><%=userinfo.getInBkType() %></td>
	      </tr>
   		  <tr>
   		    <td>身份证号：</td>
   		    <td colspan="5"><%=user.getUsIdcard() %></td>
   		    
	      </tr>
   		  <tr>
   		    <td>通讯地址：</td>
   		    <td colspan="3"><%=userinfo.getInTxdzSf() %><%=userinfo.getInTxdzCs() %><%=userinfo.getInTxdzDq() %><%=userinfo.getInTxdzXxdz() %></td>
   		    <td>邮编：</td>
   		    <td><%=userinfo.getInTxdzPost() %></td>
	      </tr>
   		  <tr>
   		    <td>联系电话：</td>
   		    <td><%=userinfo.getInCall() %></td>
   		    <td>电子邮箱：</td>
			<td><%=user.getUsEmail() %></td>
   		    <td>手机：</td>
   		    <td><%=user.getUsMobile() %></td>
	      </tr>
	      </table>
	      
   		  <table width="1000" class="gridtable" style="margin-bottom:10px;margin:0 auto;">
   		  
   		  <tr>
   		    <td width="100" height="100" align="left"><%out.print(anconfig.getSingleConfigInfoByName("测试通知单内容")); %>
   		    </td>
	      </tr>
  </table>

  		<div style="text-align:center;border-top:1px dotted #333;margin-top:20px;"><h1><%=anconfig.getSingleConfigInfoByName("测试通知单名称") %>(副联)</h1></div>
  		<table width="1000" class="toptable" style="margin:0 auto;">
    		  <tr>
		        <td>
		        <div style="width:190px;float:left;">网上报名编号：<%=receiveno %></div>
		        <div <%if(!Status.YES.getStatus().equals(comanager.getDataByCoEn("column1").getAddPermit()))out.print("style='display:none'"); %> style="width:190px;float:left;"><%=comanager.getDataByCoEn("column1").getCoCn() %>:
		        <%=exValue.getColumn1() %></div>
		        <div <%if(!Status.YES.getStatus().equals(comanager.getDataByCoEn("column2").getAddPermit()))out.print("style='display:none'"); %> style="width:190px;float:left;"><%=comanager.getDataByCoEn("column2").getCoCn() %>:
		        <%=exValue.getColumn2() %></div>
		        <div <%if(!Status.YES.getStatus().equals(comanager.getDataByCoEn("column3").getAddPermit()))out.print("style='display:none'"); %> style="width:190px;float:left;"><%=comanager.getDataByCoEn("column3").getCoCn() %>:
		        <%=exValue.getColumn3() %></div>
		        <div <%if(!Status.YES.getStatus().equals(comanager.getDataByCoEn("column4").getAddPermit()))out.print("style='display:none'"); %> style="width:190px;float:left;"><%=comanager.getDataByCoEn("column4").getCoCn() %>:
		        <%=exValue.getColumn4() %></div>
		        <div <%if(!Status.YES.getStatus().equals(comanager.getDataByCoEn("column5").getAddPermit()))out.print("style='display:none'"); %> style="width:190px;float:left;"><%=comanager.getDataByCoEn("column5").getCoCn() %>:
		        <%=exValue.getColumn5() %></div>
		        <div <%if(!Status.YES.getStatus().equals(comanager.getDataByCoEn("column6").getAddPermit()))out.print("style='display:none'"); %> style="width:190px;float:left;"><%=comanager.getDataByCoEn("column6").getCoCn() %>:
		        <%=exValue.getColumn6() %></div>
		        <div <%if(!Status.YES.getStatus().equals(comanager.getDataByCoEn("column7").getAddPermit()))out.print("style='display:none'"); %> style="width:190px;float:left;"><%=comanager.getDataByCoEn("column7").getCoCn() %>:
		        <%=exValue.getColumn7() %></div>
		        <div <%if(!Status.YES.getStatus().equals(comanager.getDataByCoEn("column8").getAddPermit()))out.print("style='display:none'"); %> style="width:190px;float:left;"><%=comanager.getDataByCoEn("column8").getCoCn() %>:
		        <%=exValue.getColumn8() %></div>
		        </td>
		      </tr>
   		</table>
  		<table width="1000" class="gridtable" style="margin-bottom:0px;margin:0 auto;">
   		  <tr>
   		    <td>姓　名：</td>
   		    <td><%=user.getUsName() %></td>
   		    <td>性　别：</td>
   		    <td><%=userinfo.getInSex() %></td>
   		    <td>出生日期：</td>
   		    <td><%=userinfo.getInBirthday() %></td>
   		    <td rowspan="10" align="center" valign="top"><img name="" src="../<%=userinfo.getInPhoto()%>" width="180" height="240" alt="" /></td>
          </tr>
   		  <tr>
   		    <td>民　族：</td>
   		    <td><%=userinfo.getInMz() %></td>
   		    <td>政治面貌：</td>
   		    <td><%=userinfo.getInZz() %></td>
   		    <td>考生类别：</td>
   		    <td><%=userinfo.getInBkType() %></td>
	      </tr>
   		  <tr>
   		    <td>身份证号：</td>
   		    <td colspan="5"><%=user.getUsIdcard() %></td>
	      </tr>
   		  <tr>
   		    <td>通讯地址：</td>
   		    <td colspan="3"><%=userinfo.getInTxdzSf() %><%=userinfo.getInTxdzCs() %><%=userinfo.getInTxdzDq() %><%=userinfo.getInTxdzXxdz() %></td>
   		    <td>邮编：</td>
   		    <td><%=userinfo.getInTxdzPost() %></td>
	      </tr>
   		  <tr>
   		    <td>联系电话：</td>
   		    <td><%=userinfo.getInCall() %></td>
   		    <td>电子邮箱：</td>
			<td><%=user.getUsEmail() %></td>
   		    <td>手机：</td>
   		    <td><%=user.getUsMobile() %></td>
	      </tr>
	      </table>
	      
   		  <table width="1000" class="gridtable" style="margin-bottom:10px;margin:0 auto;">
   		  
   		  <tr>
   		    <td width="100" height="100" align="left" valign="bottom"><%out.print(anconfig.getSingleConfigInfoByName("测试通知单内容")); %><div style="width:120px;float:right;"> <img id='ewcode2' width='100' height='100'/><br>
   		      详页 </div>
   		      <div style="width:120px;float:right;"> <img id='ewcode1' width='100' height='100'/><br>
   		        签到 </div></td>
	      </tr>
  </table>       
      
      
<div style="width:1000px;margin:0 auto;"><%out.print(anconfig.getSingleConfigInfoByName("测试通知单打印需知")); %></div>

   </div>

<script>
$("#ewcode1").attr("src","http://qr.topscan.com/api.php?text=<%=anconfig.getSingleConfigInfoByName("网站域名") %>/admin/zsApplyViewStatus.jsp?usId=<%=user.getUsId()%>&localStatusType=single"); 
$("#ewcode2").attr("src","http://qr.topscan.com/api.php?text=<%=anconfig.getSingleConfigInfoByName("网站域名") %>/admin/zsApplyViewEdit.jsp?usId=<%=user.getUsId()%>"); 

</script>
</body>
</html>
